package com.teradata.iodata;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * 测试url：
 *  http://localhost:8080/Tutorial.svc/BusinessPartners
 *  http://localhost:8080/Tutorial.svc/BusinessPartners?$filter=CustomNum1%20gt%20100
 *  http://localhost:8080/Tutorial.svc/BusinessPartners?$filter=Country%20ne%20%27USA%27
 *  Console output
 *  Elem:$filter EValue:[Country ne 'USA']
 *  Hibernate:
 *  select
 *  businesspa0_.CustomNum1 as col_0_0_,
 *  businesspa0_.CustomString1 as col_1_0_,
 *  businesspa0_.ETag as col_2_0_,
 *  businesspa0_.CustomNum2 as col_3_0_,
 *  businesspa0_.Country as col_4_0_,
 *  businesspa0_.CustomString2 as col_5_0_,
 *  businesspa0_.iD as col_6_0_
 *  from
 *  BusinessPartner businesspa0_
 *  where
 *  businesspa0_.Country=?
 *
 *  http://localhost:8081/Tutorial.svc/BusinessPartners?$filter=Country%20eq%20%27USA%27&$select=Country,CustomNum1
 *  http://localhost:8081/Tutorial.svc/BusinessPartners?$filter=Country%20eq%20%27USA%27%20and%20CustomNum1%20gt%200&$select=Country,CustomNum1
 *  Console output
 *  Elem:$filter EValue:[Country eq 'USA']
 *  Elem:$select EValue:[Country,CustomNum1]
 *  Hibernate:
 *  businesspa0_.Country as col_0_0_,
 *  businesspa0_.CustomNum1 as col_1_0_,
 *  businesspa0_.iD as col_2_0_
 *  from
 *  BusinessPartner businesspa0_
 *  where
 *  businesspa0_.Country=?

 */
@SpringBootApplication
@ServletComponentScan
@EnableAsync
public class OdataApplication {
    public static void main(String[] args) throws Exception {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(OdataApplication.class, args);
    }
}
